/**
 * 
 */
package name.marz.to.go.btree.node;

/**
 * @author masaru-gotou
 *
 */
public class Key implements Cloneable,Comparable<Key> {
	private int value;

	public Key(int value) {
		super();
		this.value = value;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	@Override
	public int compareTo(Key o) {
//		if ( o == null ) return 1;
		return this.value - o.value;
	}

	@Override
	public Object clone() {
		try {
			return super.clone();
		} catch (CloneNotSupportedException e) {
			throw (new InternalError("Clone not supported."+e.getMessage()));
		}
	}
}
